.TH E1432_SET_USERWINDOW 3 E1432
.SH NAME
.nf
e1432_set_user_window \- Download arbitary FFT window type
.fi
.IX e1432_set_user_window(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_user_window(E1432ID hw, SHORTSIZ16 ID, 
					FLOATSIZ64 *buf, FLOATSIZ64 scale)
.cE
.SH DESCRIPTION

\fIe1432_set_user_window\fR downloads an arbitrary FFT window type.  
This window is applied to input data as part of the FFT.  
The FFT can be turned on using \fIe1432_set_calc_data\fR with the 
\fBE1432_DATA_FREQ\fR or \fBE1432_DATA_ORDER\fR parameter.  
Windowing is used to reduce leakage effects caused by input frequency 
components that are not multiples of (effective_clock_freq)/(input blocksize).

\fIe1432_set_user_window\fR also sets the window type to
\fBE1432_WINDOW_USER1\fR.  Any call to \fIe1432_set_window\fR that
changes the window type away from \fBE1432_WINDOW_USER1\fR will erase the
user window.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIbuf\fR is an array of size \fBE1432_WINDOW_SIZE_MAX\fR defining the
arbitrary window.  Note that this array must be the full size even if
the blocksize used is smaller that \fBE1432_WINDOW_SIZE_MAX\fR.

\fIscale\fR is the scale factor for the user window, used to scale the FFTed 
data properly.  The FFTed data is internally multiplied by:

		\fIscale\fR / blocksize.

.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_calc_data, e1432_set_window.
.ad
